package com.lzx.adx.report.enums;

/**
 * 58和媒体趣头条回调类型映射
 */
public enum HmjcQttBaiduEnum {
    activate("android_activate", "0", "activate"),
    day1retention("android_day1retention", "6", "retain_1day"),
    ;

    private String productCode;

    private String qttCode;

    private String baiduCode;


    HmjcQttBaiduEnum(String productCode, String qttCode, String baiduCode) {
        this.productCode = productCode;
        this.qttCode = qttCode;
        this.baiduCode = baiduCode;

    }

    public String getProductCode() {
        return productCode;
    }

    public String getQttCode() {
        return qttCode;
    }


    public static String getQttCode(String productCode) {
        HmjcQttBaiduEnum[] qttWBEnums = HmjcQttBaiduEnum.values();
        for (HmjcQttBaiduEnum qttWBEnum : qttWBEnums) {
            if (qttWBEnum.getProductCode().equals(productCode)) {
                return qttWBEnum.getQttCode();
            }
        }
        return null;
    }

    public static String getBaiduCode(String productCode) {
        HmjcQttBaiduEnum[] baiduEnums = HmjcQttBaiduEnum.values();
        for (HmjcQttBaiduEnum qttWBEnum : baiduEnums) {
            if (qttWBEnum.getProductCode().equals(productCode)) {
                return qttWBEnum.getBaiduCode();
            }
        }
        return null;
    }

    public String getBaiduCode() {
        return baiduCode;
    }
}
